package edu.washington.tcss360.burningpenguins.tests;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

import edu.washington.tcss360.burningpenguins.data.Category;
import edu.washington.tcss360.burningpenguins.data.DataObject;


/**
 * This class Tests Category.
 * @author Rolando Sierra
 *@version 11/17/2013
 */
public class CategoryTest 
{

	/** A category object to use in tests */
	private DataObject my_category;
	
	/** Sets up the data object or tests. */
	@Before
	public void setUp() throws Exception 
	{
		my_category = new Category();
	}

	/** Test setting and getting ID. */
	@Test
	public void testGetId() 
	{
		my_category.setId(3);
		assertSame("Incorrect Id", my_category.getId(), 3);
	}

	/** Test setting and getting title. */
	@Test
	public void testGetTitle() 
	{
		((Category) my_category).setTitle("test");
		assertSame("Incorrect Title", ((Category) my_category).getTitle(), "test");
	}

}
